class yumlocal::repos_emi2 {

  case $operatingsystemmajrelease {
  '5': {
     yumrepo { "emi2-base":
        baseurl => "http://202.122.33.67/yum/emi/2/sl5/x86_64/base",
        descr => "emi2-base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "emi2-contribs":
        baseurl => "http://202.122.33.67/yum/emi/2/sl5/x86_64/contribs",
        descr => "emi2-base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "emi2-third-party":
        baseurl => "http://202.122.33.67/yum/emi/2/sl5/x86_64/third-party",
        descr => "emi2-base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "emi2-updates":
        baseurl => "http://202.122.33.67/yum/emi/2/sl5/x86_64/updates",
        descr => "emi2-base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
    }
  }
  case $operatingsystemmajrelease {
  '6': {
     yumrepo { "emi2-base":
        baseurl => "http://202.122.33.67/yum/emi/2/sl6/x86_64/base",
        descr => "emi2-base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "emi2-contribs":
        baseurl => "http://202.122.33.67/yum/emi/2/sl6/x86_64/contribs",
        descr => "emi2-base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "emi2-third-party":
        baseurl => "http://202.122.33.67/yum/emi/2/sl6/x86_64/third-party",
        descr => "emi2-base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "emi2-updates":
        baseurl => "http://202.122.33.67/yum/emi/2/sl6/x86_64/updates",
        descr => "emi2-base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
    }
  }

   yumrepo { "EGI-trustanchors":
      baseurl => "http://202.122.33.67/yum/ca",
      descr => "EGI-trustanchors",
      enabled => 1,
      gpgcheck => 0,
      priority => 43,
      before   => Yumrepo['site']
   }
}
